package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardLogisticsorderTpcancelRequest struct {
	/*
	   工单IdList     */
	WorkcardIdList *[]int64 `json:"workcard_id_list" required:"true" `
	/*
	   取消原因     */
	Comment *string `json:"comment" required:"true" `
	/*
	   实际履行服务商nick     */
	RealTpNick *string `json:"real_tp_nick" required:"true" `
}

func (s *TmallServicecenterWorkcardLogisticsorderTpcancelRequest) SetWorkcardIdList(v []int64) *TmallServicecenterWorkcardLogisticsorderTpcancelRequest {
	s.WorkcardIdList = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderTpcancelRequest) SetComment(v string) *TmallServicecenterWorkcardLogisticsorderTpcancelRequest {
	s.Comment = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsorderTpcancelRequest) SetRealTpNick(v string) *TmallServicecenterWorkcardLogisticsorderTpcancelRequest {
	s.RealTpNick = &v
	return s
}

func (req *TmallServicecenterWorkcardLogisticsorderTpcancelRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardIdList != nil {
		paramMap["workcard_id_list"] = util.ConvertBasicList(*req.WorkcardIdList)
	}
	if req.Comment != nil {
		paramMap["comment"] = *req.Comment
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardLogisticsorderTpcancelRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
